Skip to content

[ASIM - 6224] - Update hookman to deal with multiple versions of a plugin#147

Merged
BeneBr merged 3 commits intomasterfrom
fb-ASIM-6224-gui-multiple-plugin-versions
Aug 15, 2025
Merged

[ASIM - 6224] - Update hookman to deal with multiple versions of a plugin#147
BeneBr merged 3 commits intomasterfrom
fb-ASIM-6224-gui-multiple-plugin-versions

Conversation

@BeneBr
Copy link
Copy Markdown
Contributor

@BeneBr BeneBr commented Jul 18, 2025

Description

Update the hookman to handle multiple plugins installed in theplugins_dir
ASIM-6224

@BeneBr BeneBr force-pushed the fb-ASIM-6224-gui-multiple-plugin-versions branch from 4f1a2b0 to 98a2b59 Compare July 18, 2025 23:38
@BeneBr BeneBr force-pushed the fb-ASIM-6224-gui-multiple-plugin-versions branch from 38c8cdf to 36668e2 Compare July 18, 2025 23:42
Comment thread hookman/hooks.py Outdated
Comment thread hookman/hooks.py Outdated
Comment thread hookman/hooks.py Outdated
Comment thread hookman/plugin_config.py Outdated
Comment thread tests/test_plugin_config.py Outdated
@BeneBr BeneBr requested review from cauebs and nicoddemus July 21, 2025 11:09
@BeneBr BeneBr changed the title Update hookman to deal with multiple versions of a plugin [ASIM] - Update hookman to deal with multiple versions of a plugin Jul 21, 2025
@BeneBr BeneBr changed the title [ASIM] - Update hookman to deal with multiple versions of a plugin [ASIM - 6224] - Update hookman to deal with multiple versions of a plugin Jul 21, 2025
Comment thread hookman/hooks.py Outdated
Comment thread hookman/hooks.py
Comment thread hookman/hooks.py Outdated
Comment thread tasks.py Outdated
@BeneBr BeneBr force-pushed the fb-ASIM-6224-gui-multiple-plugin-versions branch 6 times, most recently from c6fc94a to 835b040 Compare July 28, 2025 21:27
Comment thread tasks.py Outdated
@BeneBr BeneBr force-pushed the fb-ASIM-6224-gui-multiple-plugin-versions branch 3 times, most recently from b041a86 to 654d94f Compare August 5, 2025 23:24
Comment thread tests/conftest.py
@BeneBr BeneBr force-pushed the fb-ASIM-6224-gui-multiple-plugin-versions branch 4 times, most recently from bd7f02f to 654d94f Compare August 9, 2025 19:55
- Make the version be a object of Version;
- Make the version property be optional in remove_plugin;
- Use the rsplit to obtain the correct name of plugin from its folder;
@BeneBr BeneBr force-pushed the fb-ASIM-6224-gui-multiple-plugin-versions branch 3 times, most recently from 6b2e725 to b85b49f Compare August 15, 2025 19:39
@BeneBr BeneBr merged commit 8dbc46e into master Aug 15, 2025
7 checks passed
Comment thread hookman/hooks.py
Comment on lines +133 to +147

yaml_data = PluginInfo._load_yaml_file(yaml_content)
plugin_id: str = yaml_data["id"]
plugin_version: str = yaml_data["version"]
plugin_id_version = f"{plugin_id}-{plugin_version}"

plugins_dirs = [x for x in dest_path.iterdir() if x.is_dir()]

if plugin_id in [x.name for x in plugins_dirs]:
if plugin_id_version in [x.name for x in plugins_dirs]:
raise PluginAlreadyInstalledError("Plugin already installed")

plugin_destination_folder = dest_path / plugin_id
plugin_destination_folder = dest_path / plugin_id_version
plugin_destination_folder.mkdir(parents=True)
plugin_file_zip.extractall(plugin_destination_folder)
return plugin_id
return InstalledPluginInfo(version=Version(plugin_version), id=plugin_id)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will existing installed plugins be handled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants